<?php
session_start();
if (isset($_SESSION['username'])){
	$user = $_SESSION['username'];
	echo "<p>Hello, $user </p>";
}
else {
	$link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
	$_SESSION['USER_URL'] = $link;
	header("Location: login.php");
	exit();
}
echo "<p><a href=\"logout.php\">Logout</a></p>";
